package hhm.android.myframe

import android.content.Context
import android.view.LayoutInflater
import android.view.ViewGroup
import hhm.android.base.adapter.HBaseAdapter

class BaseAdapter(private val context: Context, list: ArrayList<Int>) :
    HBaseAdapter<MyViewHolder, Int>(list) {
    override fun bindView(parent: ViewGroup, viewType: Int): MyViewHolder {
        val v = LayoutInflater.from(context).inflate(R.layout.item_tv, parent, false)
        return MyViewHolder(v)
    }

    override fun bindData(holder: MyViewHolder, bean: Int, position: Int) {
        holder.tv.text = list[position].toString()
    }
}